#[derive(Debug)]
struct Rectangle {
    width: u32,
    height: u32,
}

fn main() {
    let width1 = 30;
    let height1 = 50;
    println!("val{}", area(width1, height1));
    let rect1 = (30, 50);
    println!("val{}", area1(rect1));
    let str = Rectangle {
        width: 30,
        height: 50,
    };
    println!("obj{},{}", area2(&str), str.width);
    let scale = 2;
    let rect2 = Rectangle {
        width: dbg!(30 * scale),
        height: 50,
    };
    dbg!(&rect2);
}
fn area(width: u32, height: u32) -> u32 {
    width * height
}
fn area1(tuple: (u32, u32)) -> u32 {
    tuple.0 * tuple.1
}
fn area2(str: &Rectangle) -> u32 {
    str.width * str.height
}
